﻿Imports System
Imports System.Windows.Forms
Imports DNP.GestionComercial.BE

Public Class frmFormBasePrincipal
    Public vRespuesta As New PARAMETROBE


#Region "Declaracion de Variables"

    Public _blnClickNuevo As Boolean = False
    Public blnValidoNuevo As Boolean = False
    Public _blnClickGrabar As Boolean = False
    Public _blnSalir As Boolean = False

#End Region

#Region "Funciones Personalizadas"

    Protected Sub SelectItem(ByRef oComboBox As System.Windows.Forms.ComboBox, ByVal valor As String)
        oComboBox.SelectedValue = valor
    End Sub

    Protected Sub disableTextBox(ByRef oTextBox As System.Windows.Forms.TextBox)
        If Not oTextBox.ReadOnly Then
            oTextBox.ReadOnly = True
        End If
    End Sub

    Protected Sub enableTextBox(ByRef oTextBox As System.Windows.Forms.TextBox)
        If oTextBox.ReadOnly Then
            oTextBox.ReadOnly = False
            oTextBox.TabIndex = 0
        End If
    End Sub

#End Region

#Region "Eventos de Controles"

    Public Overridable Sub tsbGuardar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsbGuardar.Click

    End Sub

    Public Overridable Sub tsbSalir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsbSalir.Click
        Me.Close()
    End Sub

#End Region

    Public Sub New()

        ' Llamada necesaria para el diseñador.
        InitializeComponent()

        ' Agregue cualquier inicialización después de la llamada a InitializeComponent().

        Dim newCulture As System.Globalization.CultureInfo = System.Globalization.CultureInfo.CurrentUICulture.Clone()
        newCulture.NumberFormat.CurrencySymbol = "Rs "
        newCulture.NumberFormat.CurrencyDecimalDigits = 2

        newCulture.NumberFormat.CurrencyGroupSeparator = ","
        newCulture.NumberFormat.CurrencyDecimalSeparator = "."
        
        System.Threading.Thread.CurrentThread.CurrentCulture = newCulture
        System.Threading.Thread.CurrentThread.CurrentUICulture = newCulture

    End Sub
End Class